package cn.edu.just.firstjavaapp.l10.v2;

public class Rectangle extends Shape{

    int width;
    int height;

    public Rectangle() {
        this(0,0,10,10);
    }
    public Rectangle(int x, int y, int width, int height) {
       super(x,y);
        this.width = width;
        this.height = height;
    }


    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }



    public void draw(){
        System.out.println(toString());
    }

    @Override
    public String toString() {
        return "Rectangle{" +
                "x=" + x +
                ", y=" + y +
                ", width=" + width +
                ", height=" + height +
                '}';
    }
}
